Apparatus and method for power management of downhole tool

ABSTRACT

An apparatus for power conservation and selectively switching between one or more power source and a load disposed within a downhole tool based on specific condition of the environment comprising an electrical load, at least one electric power source, a controllable power switch for selectively electrically connecting and disconnecting the electric power and a controller responsive to a predetermined change in the environment; A method for power conservation of a downhole tool in response to a predetermined change in a physical property of the environment, and a method for cooling a component in a downhole tool using drilling fluid inserted form surface.

BACKGROUND OF THE INVENTION

Power conservation is important in many application especially when expensive batteries are used in extreme environmental conditions eg., in oil and gas explorations. The present invention generally relates to the power conservation of the downhole tool used in the Oil and Gas industry. More particularly, the invention relates to the power distribution system to turn on and off various devices at particular instant of time for a desired period. Another aspect, the present invention relates to the conservation of energy by forcing the system to go into the dormant or sleep mode. The system turns on to perform the desired task for a certain duration and switches to dormant mode after the task is done, then it waits for the next task to turn on the system again to a higher energy consumption level. Generally, the energy used in the working mode is more than what is used by the device in sleep mode.

Oil and gas or hydrocarbons are generally extracted from the earth's crust by boring wells either in land or in seas. In particular, drill bits attached to the lower side of the drill string are used to drill holes into the earth's crust. These drill bits are directed to the desired geographical location by means of a drilling rig installed at the earth's surface.

The drilling operation results in generating heat leading to the increase of the well temperature especially in cases of rock drilling under extreme environmental conditions. With the aim of cooling the well, a drilling fluid, also called mud, is pumped from surface down through the tubular string internal fluid passage to the drill bit and through the drill string as to absorbs a high percentage of the generated heat. Inserted mud pumped from surface is of cooler temperature than the downhole earth temperature. In addition, this cooling mud helps in carrying out cuttings of stones and rocks from the bottom of the well to the surface through the annulus space between the tubular string and borehole wall. Due to the continuous variation in the depth and environmental parameters such as pressure, temperature, and other parameters, sensors such as pressure, temperature, gyro are generally installed to provide a feedback to the surface operators about the downhole conditions.

To monitor different environmental variables using sensors and actuators, a power source is required to power these devices. The sensor's and actuator's data are processed using microprocessors or microcontrollers to actuate different actuators to perform the desired tasks. Many electronic components share a power source. A downhole tool could have one or many power sources depends on the configuration, power requirements, state of operations. For example a power source could be used to power an actuator and another power source for sensor circuit and a third for internal communication circuit from one downhole tool to another downhole tool. In a different embodiment, all components could share the same power source. In addition, a communication system is often used to transmit the downhole parameters to the surface which are also powered by a power source in the downhole tool. Operating the electronic devices in the downhole environment is a challenging task in which the onboard electronic devices must withstand the high pressure and temperature while drilling leading to the use of expensive and high-temperature rated electronic devices and power supply. One of the challenges in operating these electronic devices is to provide them with electric power. Another challenge is to keep the electronics at lower temperature whenever possible. It is quite difficult to provide the power using electric wire or cables from the surface particularly while drilling an oil well, therefore special batteries are generally used to power the electrical devices. As conventional batteries are not well-suited for operations in high temperature environment, high temperature batteries are used instead. These batteries have an altered chemistry which makes it possible to work efficiently by providing electrical power at high temperature and are expensive. Sufficient expensive batteries are inserted in the downhole tool to provide the required power. For longer period of operation, more batteries are inserted within the tool. it is desirable therefore to conserve the batteries whenever possible. It is further desired to keep the batteries at lower temperature than the formation temperature as much as possible. Since most of the electronics or actuators are not all required to be powered on to their full operational condition all the time, it would be desirable to reduce the power consumed when the a component is not in full operational mode. An efficient power conservation device which draws minimum power from the battery is desirable to increasing the battery life to operate longer and at lower operating cost.

SUMMARY OF SOME EXAMPLES OF THE INVENTION

Power conservation plays an essential role in many applications especially when expensive batteries are used in extreme environmental conditions eg., in oil and gas explorations, air craft, spaceships, etc. Downhole tools contain various electronic devices for operations such as drilling, perforating, fracturing, well testing, hydrocarbon production. These operations require the measurement or processing of downhole environmental conditions including pressure, temperature, vibrations levels etc.

The present invention relates to power conservation of batteries used in downhole tools. In another aspect, the invention also relates to automatic selective powering up of electronic devices used in downhole tools.

Scheduled powering up of the devices at required times to perform desired tasks and powering them off once the job is accomplished is essential for power conservation.

In another aspect, the invention also relates to a wake-up or activation system which turns on or off certain required devices based on various factors such as temperature, pressure, depth, position, angular speed, vibration level, polarity, timer etc.

A particular device is turned on only when the desired feature is within a specific range. In another aspect, the invention also relates to power distribution system to turn on or off various devices at particular instants of time for a pre-defined period of time used in power conservation of the downhole tool.

In another aspect, the present invention also relates to the device for conservation of energy by forcing the system to go into different working modes or to dormant or sleep mode. The system turns on to perform the desired task in a particular working mode for a certain duration of time and then switches to dormant mode after the task is accomplished. The system then waits for the next task to turn on. Generally, the energy consumption in the working mode is much higher than that consumed by the device in sleep or dormant mode.

In one example, the apparatus is configured and arranged to work inside a downhole tool used in a downhole environment of subterranean wells comprising:

An electrical load having plurality of load values selected from the set comprising;

-   -   A predetermined load,     -   A larger load;     -   A smaller load;

An electric power source for providing electric power to operate the electrical load disposed within the apparatus;

A controllable power switch for electrically connecting between the electric power source and the electrical load;

a controller having at least two states selected from the set of states comprising

a power state wherein the electric power source is connected to the electrical load,

a higher power state wherein the electric power source is connected to the electrical load and the electrical load is having a larger load value,

a dormant state wherein the electric power source is connected to the electrical load and the electrical load is having smaller load value,

and an off state wherein the electrical load is not connected to the electric power source;

wherein the controllable power switch is responsive to the controller state.

In another example, the embodiments of the invention is defined as an electric circuit for downhole tool configured and arranged to work in a downhole environment of subterranean wells comprising:

a controllable power switch for power conservation electrically connected to at least two terminals;

An electric power source for sourcing electric power to operate the electrical load;

A controllable electrical load;

a controller having at least two states selected from the set of states comprising a power state wherein a predetermined power is supplied to a load from a source within the apparatus, a more power state wherein a source of higher power is connected to the load, a higher load state wherein a larger electrical load is connected to the electric power source, a dormant state wherein the load consume less power from the source, and off state wherein the load is not connected to a source; Wherein a first terminal of the at least two terminals is selected from the set of terminals comprising a source terminal and an off terminal, and a second terminal of the at least two terminals are selected from the set comprising an off terminal and a load terminal;

A control link to operatively connect the switch controller to at least one element of the set comprising electric power source, controllable power switch and electrical load.

In another example, the controller further comprises a sensor; wherein the controller state is responsive to a predetermined change of the environment detected by the sensor.

In another example the electric circuit comprising a sensor, wherein the sensor is selected from the set comprising:

A flow sensor, a pressure sensor, a temperature sensor, a magnetic sensor, a GPS, a Radio Frequency sensor, an ultrasonic sensor, an inertial element sensitive to the movement of the apparatus; an inclination sensor sensitive to the inclination of the apparatus and a rotation sensor sensitive to the rotation of the apparatus, and a timer;

In another example the controller is selected from the set comprising a mechanical controller, a hydraulic controller, an electronic controller, a microprocessor, a micro controller, a Programmable Logic Controller (PLC), and a Distributed Control System (DCS)

In another example, an electric circuit for downhole tool, comprising: a controllable power switch for power conservation, wherein a controllable power switch comprising a source terminal, an off terminal and a load terminal; an electric power source for operating an electrical load; an electrical load electrically is coupled to the power source and the controllable power switch where an electrical load comprises of various power consumption modes, wherein a controllable power switch is configured to close, alternatively called “electrically connect” based on a predetermined condition of the power requirements of the electrical load.

In another example the apparatus comprises a control electronics operatively connected to the controllable power switch, where in the control electronics is configured to control the controllable power switch connections between a first terminal selected from the set comprising an off terminal and a source terminal to a second terminal selected from the set comprising an off terminal and a load terminal.

In another example, the control electronics is connected to the controllable power switch is configured to open, or electrically disconnect between its at least two terminals based on a predetermined condition.

In another example, the electric power source comprises one or more power module wherein each power module represents a separate electric power source.

In another example, the electrical load having plurality of electrical load modes wherein, each electrical load mode represents a different electrical load. In another example, the electrical load mode is of higher electrical load when the electrical load mode is high load, and in another example the electrical load is of lower electrical load when the electrical load mode is dormant. In another example the electrical load is responsive to the electrical load mode.

In another example, the control electronics connected to the controllable power switch is configured and arranged to connect a first power module to an electrical load subject to the predetermined power requirements at the load terminal.

In another example, the control electronics connected to the controllable power switch is configured and arranged to connect a second power module to the power terminal based on the predetermined power requirements at the load terminal.

In another example, the control electronics connected to the controllable power switch is configured and arranged to cause the controllable power switch to connect a first electrical load module to a first electric power source.

In another example, the control electronics connected to the controllable power switch is configured and arranged to cause the controllable power switch to connect a second electrical load to a second electric power source module.

In another example, the control electronics connected to the controllable power switch is configured to connect the controllable power switch to an off terminal based on the predetermined condition to electrically disconnect the electrical load from the electric power source.

In another example, the control electronics connected to the controllable power switch is configured to disconnect the electric power source from the electrical load.

In another example, the electric circuit further comprises an electronic controller.

In another example the electronic controller comprises a sensor for detecting changes in pressure, temperature, predetermined wireless signal such as Bluetooth signal, light wave, ultraviolet wave, Infrared wave, electromagnetic wave, Wi-Fi signal, GPS signal, or other signal detectable by the sensor.

In another example, the controllable power switch is configured to close the circuit and connect a power source to an electrical load in response to the signal detected by the sensor.

In another example the apparatus further comprises a flow activated controller element coupled with a controllable power switch through a control link wherein the controllable power switch is configured to change its mode or position in response to a predetermined change in fluid flow rate.

In another example the apparatus further comprises a pressure activated controller element coupled with a controllable power switch through a control link wherein the controllable power switch is configured to change its mode or position in response to a predetermined change of the pressure at the apparatus.

In another example the apparatus further comprises a magnetic field activated controller element coupled with a controllable power switch through a control link wherein the controllable power switch is configured to change its mode based on a predetermined change of the magnetic field at the apparatus.

In another example the apparatus further comprises a magnetic field polarity activated controller element coupled with a controllable power switch through a control link wherein the controllable power switch is configured to change its mode in response to a predetermined change of the magnetic field polarity at the apparatus.

In another example the apparatus further comprises an inertial mass activated controller element coupled with a controllable power switch through a control link wherein the controllable power switch is configured to change its mode in response to a predetermined change of the inclination of the apparatus.

In another example the apparatus further comprises a mass activated controller element coupled with a controllable power switch through a control link wherein the controllable power switch is configured to change its mode in response to a movement of the apparatus in at least one direction.

In another set of examples, a system for conserving power based on the movement of the apparatus within a drilling string, comprising of an inertial mass activated controller element coupled with a controllable power switch through a control link wherein the controllable power switch is attached to the plurality of electrical loads, when the apparatus is static controllable power switch is configured to operate the second electrical load, when the apparatus is moving down the controllable power switch is configured to connect the third electrical load and when the apparatus is moving up controllable power switch is configured to connect the first electrical load.

In another set of examples, an apparatus for power conservation is disposed within an oil well, the apparatus comprising:

a controllable power switch for power conservation comprising a source terminal, an off terminal and a load terminal;

an electrical load having a plurality of power consumption modes;

an electric power source for operating the electrical load;

wherein the electrical load is selectively coupled to the power source through the controllable power switch;

wherein the controllable power switch is configured to change mode in response to a predetermined electrical load power requirement.

In another example, the apparatus further comprises a control electronics operatively connected to the controllable power switch. The control electronics is configured to change the controllable power switch connections between at least two terminals selected from the set comprising; an off terminal, a source terminal, and a load terminal.

In another example the electric power source comprises one or more power module wherein the power module comprises and independent electric power source.

In another example the electrical load is configured to have a predetermined set of variable electrical loads selected form the set comprising a first electrical load, a second electrical load, a higher electrical load, and a lower electrical load.

In one example, a control electronics linked to the controllable power switch is configured and arranged to change the controllable power switch mode such that power source connected to the electrical load is changed from a first power source to a second power source.

In another example, the control electronics linked to the controllable power switch is configured to change the controllable power switch mode such that the electric load is connected to the off terminal and disconnecting the electrical load from the power terminal

In another example the controller changes the controllable switch mode such that the electrical load is disconnected from the electric power source.

In one example, a system for conserving power based on the movement of the apparatus in the drill string, comprising of an inertial mass activated controller element coupled with a controllable power switch through a control link wherein the controllable power switch is attached to the plurality of electrical loads. When the apparatus is not moving the controllable power switch is configured to connect an electrical load to a power source, when the apparatus is moving in one direction the controllable power switch is configured to connect to a first electrical load to the power source and when the apparatus is moving in a second direction the controllable power switch is configured to connect a second electrical load to a power source

DISCUSSION OF BACKGROUND

The present application claims priority to U.S. provisional application No. 62/083,237, for Apparatus and Method for Electric Power Conservation in a Downhole Tool, by Ahmed Tahoun filed on 23 Nov. 2014.

The present application is related to the U.S. Pat. No. 6,670,880, issued in Dec. 30, 2003, for DOWNHOLE DATA TRANSMISSION, by David R. Hall, H. Tracy Hall, Jr., David Pixton, Scott Dahlgren, Joe Fox.

The present application is related to U.S. Pat. No. 4,709,234, issued in Nov. 24, 1987, for DETECTING AN ENVIRONMENTAL CONDITION IN A WELL BORE, by Gilbert H. Forehand, Michael J. Lynch, Richard L. Duncan, Stephen E. Tilghman, Jack C. Penn, Less.

The present application related application of United States provisional patent application, serial number U.S. Pat. No. 5,960,883, filed in Oct. 5, 1999, for POWER MANAGEMENT FOR DOWNHOLE CONTROL SYSTEM IN A WELL AND METHOD OF USING SAME, by Paulo Tubel, Clark Bergeron, included by reference herein and for which benefit of the priority date is hereby claimed.

The present application is related to U.S. Pat. No. 5,784,004, issued Jul. 21, 1998, for APPARATUSES 2 AND SYSTEMS FOR REDUCING POWER CONSUMPTION IN REMOTE SENSING APPLICATIONS, by Esfahani, et al., included by reference herein.

FIELD OF THE INVENTION

The disclosure relates to power management in downhole applications for the oil and gas industry.

BRIEF DESCRIPTION OF THE DRAWINGS

A complete understanding of the present invention can be obtained by reference to the accompanying drawings, when considered in conjunction with the subsequent, detailed description, in which:

FIG. 1 is a schematic view of the electric power switch

FIG. 1a is a schematic view of the power switch to connect—an electric power source to an electrical load, wherein the power switch is in open position disconnecting the load from the power source.

FIG. 1b is a schematic view similar to FIG. 1a wherein the power switch is in closed position connecting the power source to the electrical load.

FIG. 1c is a schematic view of an electric circuit having two electrical loads with the power switch connected to the off terminal.

FIG. 1d is a schematic view of an electric circuit similar to the one in FIG. 2a wherein the power switch is in a different position connecting a load to a power source.

FIG. 1e is a schematic view of an electric circuit similar to the one in FIG. 1a and having two electric power sources with the power switch connecting between a power source and an electrical load.

FIG. 1f is a schematic view of an electric power switch to connect a specified power source from a pool of power sources to an electrical load selected from multiple of electrical loads.

FIG. 2 is a schematic view of a controllable power switch.

FIG. 2a is a schematic view of a controllable power switch—in open position disconnecting the power source to the electrical load.

FIG. 2b is a schematic view of a controllable power switch to connect a power source from multiple power sources to an electrical load selected among the multiple of electrical loads.

FIG. 3 is a schematic view of an electronically controlled power switch responsive to a sensor signal.

FIG. 3a is a schematic view of an electronically controlled power switch responsive to a sensor signal in an open position.

FIG. 3b is a schematic view of an electronically controlled power switch responsive to a sensor signal in a closed position.

FIG. 4 is a sketch view of a flow activated power switch.

FIG. 4a is a sketch view of the power switch when in no flow condition.

FIG. 4b is a sketch view of the flow activated power switch in another position when fluid flows in the said direction.

FIG. 5 is a sketch view of a pressure activated power switch.

FIG. 5a is a sketch view of the power switch when in no pressure condition

FIG. 5b is a sketch view of the pressure activated power switch in another position—when pressure is increased at the pressure switch.

FIG. 6 is a schematic view of a magnetically controlled power switch FIG. 6a is a schematic view of a magnetically controlled power switch in an open position.

FIG. 6b is a schematic view of a magnetically controlled power switch in closed position in presence of a magnetic field.

FIG. 7 is a schematic view of a magnetically controlled power switch FIG. 7a is a schematic view of a magnetically controlled power switch in open position in presence of a first magnetic field.

FIG. 7b is a schematic view of a magnetically controlled power switch in closed position in presence of a second magnetic field.

FIG. 8 is a power switch responsive to apparatus movement.

FIG. 8a is a schematic view of a power switch in an initial position when the apparatus is not in movement.

FIG. 8b is a schematic view of a power switch in second position when the apparatus is moving in one direction.

FIG. 8c is a schematic view of a power switch in another position when the apparatus is moving in another direction.

FIG. 9 is a schematic view of a power switch responsive to change in inclination and gravity.

FIG. 9a is a schematic view of a power switch in a first inclined angle position wherein the power switch is in a first position disconnecting the load from the power source.

FIG. 9b is a schematic view of a power switch in a second inclined angle position wherein the power switch is in a second position connecting the load to the power source; and

FIG. 10 is a schematic view of a power switch responsive to rotation.

FIG. 10a is a schematic view of a power switch in first position when the apparatus is not in rotation

FIG. 10b is a schematic view of a power switch in a second position when the apparatus is in the rotation about a rotation axis.

FIG. 11 is a cross section schematic view of a downhole tool within an oil well during drilling operation with drilling mud inserted from surface into the inner flow passage 1200 and returning to surface through the annulus 1180.

FIG. 12 is a schematic diagram of the method power management of a downhole tool

FIG. 13 is a schematic diagram of the method for cooling harvesting of a downhole tool

For purposes of clarity and brevity, similar elements and components will have the same designations and numbering throughout the Figures.

DESCRIPTION OF THE PREFERRED EMBODIMENT

FIG. 1 is a schematic view of various configurations of an electric circuit 100 comprising an electric power source 110, an electrical load 120 and a power switch 130.

The electric power source 110 is an electrical energy source providing electric power to operate the electrical load 120. The electric power source 110 provides AC or DC power to the load or any combination thereof. Electric power source 110 can be a battery, a rechargeable battery, an electric power generator, an electric energy harvesting device, or an alternator, just to mention a few. The electric power source can be wires connected from an external source.

The electrical load 120 is an electrically operated device. Electrical load 120 can be an electrically operated actuator, a solenoid, an electric motor, an electronic board, a sensor, an electrical or electronic component, an electrically operated device, an electrically operated device, or any combination thereof.

The power switch 130 is an instrument having at least two terminals, a source terminal and a load terminal 160. Its role is to provide power to the device connected to its load terminal when in closed position, and to disconnect the electric power between when in open position. The power switch 130 may have more than two terminals on one or both sides, wherein the switch connect electric power between a terminal and another terminal when in one position, and disconnect the electric power between any two terminals when in off terminal 150 position.

FIG. 1A is a schematic view of a power switch 130 to connect between an electric power source 110 and an electrical load 120. The electric power source 110 is connected to the source terminal 140. Meanwhile, the electrical load 120 is connected to the load terminal 160 of the power switch 130, wherein the power switch 130 is connected to off terminal 150 thus disconnecting the electrical load 120 from the power source.

FIG. 1B is a schematic view similar to FIG. 1A wherein the power switch 130 is in another position. In this figure, the power switch 130 is connected to load terminal 160 thus connecting the power source to the electrical load 120.

FIG. 1C is another schematic view of a similar electric circuit 100, wherein the electric circuit 100 is connected to two electrical load 120(s) and a single electric power source 110. The first and second electrical loads are connected to the load terminals and the electric power source 110 is connected to the source terminal 140 of the power switch 130.

The electrical switch is connected to the off terminal 150, thus disconnecting the electric power source 110 from the first and the second electrical load 120(s),

FIG. 1D is a schematic view of an electric circuit 100 similar to the one in FIG. 1C wherein the power switch 130 is in a different position. The electric circuit 100 is connected to two electrical 15 load 120(s) and a single electric power source 110. The first and second electrical loads are connected to the load terminals and the electric power source 110 is connected to the source terminal 140 of the power switch 130. The power switch 130 in this configuration is connected to the load terminal 160 of the first electrical load 120 thus only the first electrical load 120 is operating in this position. In another configuration of the same circuit the electric power source 110 is connected to the second electrical load 120 or the off terminal 150.

When the power switch 130 is connected to the second electrical load 120 the second electrical load 120 is driven by the same electric power source 110. When the power switch 130 is connected to the off terminal 150 the electric power source 110 is connected to the off terminal 150 thus disconnecting both the first and the second electrical load 120.

FIG. 1E is another schematic view of a similar electric circuit 100 wherein the electric circuit 100 has two electric power source 110 and a single electrical load 120. Each of the first electric power source 110 and second electric power source 110 are connected to a source terminal 140 of the power switch 130 and the electrical load 120 is connected to the load terminal 160 of the power switch 130.

In this schematic the power switch 130 is connected to the first electric power source 110 thus the electrical load 120 is operating under the first electric power source 110. In a different configuration of the same electric circuit 100, the power switch 130 in one side is connected to the second electric power source 110 and to the electrical load 120 on the other side. In a different configuration of the same electric circuit 100, the power switch 130 in one side is connected to the off terminal 150 and to the electrical load 120 on the other side.

When the power switch 130 is connected to the second electric power source 110 in the source terminal 140, the electrical load 120 is driven by the second electric power source 110.

When the power switch 130 is connected to the off terminal 150, the electrical load 120 is disconnected from both the first and the second electric power source 110.

FIG. 1F is another schematic view of the similar electric circuit 100 wherein the electric circuit 100 has two electric power sources and two electrical loads. The two electric power sources are connected to the source terminal 140 of the power switch 130 and the two electrical load 120(s) are connected to the load terminal 160 of the power switch 130. In this configuration the power switch 130 has two connecting points, namely, the first electric power source 110 in the source terminal 140 and the first electrical load 120 in the load terminal 160. Thus the first electrical load 120 is driven by the first electric power source 110.

The electric circuit 100, in another configuration, is connected on one side of the power switch 130 to second electric power or off-terminal 150 to the second electrical load 120 or the off-terminal 150 on the other side of the power switch 130 or any combination possible thereof. Thus connecting any of the electric power sources 110 or off terminal 150 in one side to any of the electrical load 120 or off-terminal 150 on the other side of the power switch 130.

FIG. 2 is a schematic view of different configurations of a controllable electric circuit 200 comprises of an electric power source 110, an electrical load 120, a switch controller 210, a control link 220 and a controllable power switch 230. The switch controller 210 is a device or an element which controls the action of controllable power switch 230 to connect between off terminal 150, load terminal 160 or source terminal 140 or any combination thereof. The controllable power switch 230 is used to operate the electrical load 120. The switch controller 210 in one example is an electronic controller 320, in one example the switch controller 210 is a processor board, in one example the switch controller 210 can be a timer device, in one example the switch controller 210 can be a comparator device, in one example the switch controller 210 is a transducer, in one example the switch controller 210 is a sensor, in one example switch controller 210 is a mechanical controller. The controllable power switch 230 is any component or device whose action to connect between the source or load or off terminals is controlled by a switch controller 210. In one example the controllable power switch 230 is a relay switch, in one example the controllable power switch 230 is solenoid, in one example the controllable power switch 230 is a diode, in one example the switch controller 210 is a transistor, and in one example the controllable power switch 230 is a logic circuit. The control link 220 is any path or element through which the control action is carried from the switch controller 210 to the controllable power switch 230 to control the action to connect position between the source or load or off terminals by a switch controller 210. in one example the control link 220 can be a mechanical link, in one example the control link 220 can be a wire or a cable, in one example the control link 220 can be a, a satellite, a Bluetooth, an SPI, an I2C, an UART, an RS485, a USB, a Digital I/O etc. Communication channel, in one example control link 220 can be an optic fiber channel or a cable. The control link 220 when connected between the controller 210 and the power source 110 can provide information on the power source electrical condition such as voltage, current passing through the electric power source 110 terminals, power consumed from the source at a particular point of time or over a period of time. The controller 210 is capable of analyzing the voltage, current, or power information provided by the power source 110 through the control link 220 to change the state and position of the controllable power switch 230.

FIG. 2A is a schematic view of a controllable power switch 230, similar to FIG. 1A having an electric power source 110 connected to an electrical load 120 through a controllable power switch 230.

The electric power source 110 is connected to the source 19 terminal 140 and the electrical load 120 is connected to the load terminal 160 of the controllable power switch 230. The controllable power switch 230 in one position is disconnecting the electric power source 110 and an electrical load 120, in the other position the controllable power switch 230 is connected to the load terminal 160 thus connecting the electric power source 110 and the electrical load 120.

FIG. 2B is a schematic view of a controllable power switch 230 similar to FIG. 1F, wherein the controllable power switch 230 is connected to the plurality of power sources on the source terminals and plurality of electrical loads on the load terminals. Controllable power switch 230 on one side is connected to off terminal 150 or to a power source from the plurality of power source(s) and on the other side is connected to the off terminal 150 or an electrical load 120 from the plurality of electrical load 120(s). The controllable power switch 230 in the given configuration is connected to the first power source on one side and to the first electrical load 120 on the other side. Thus in this configuration the first electrical load 120 is operated by the first electric power source 110. In a different configuration of the same circuit the first electric power source 110 is connected to any desired electrical load 120 or to the off terminal 150. In another configuration the second electric power source 110 is connected to any desired electrical load 120 or to the 20 off terminal 150, yet in another configuration the off terminal 150 on the left side of the controllable power switch 230 is connected to any of the desired load thus disconnecting the power source from the load. Furthermore, in another configuration the controllable power switch 230 is connected to the off terminal 150 on the right side of the controllable power switch 230 and thus disconnecting the electric power source 110 from the electrical load 120. In another configuration the off terminal 150 from the left side is connected to the off terminal 150 on the right side of the controllable power switch 230 and thus disconnecting both the electric power source 110 and the electrical load 120.

FIG. 3 is a schematic view of different configurations of a sensor 310 activated controllable power switch 230 which comprises of a sensor 310, an electric power source 110, an electrical load 120, controllable power switch 230, a control link 220 and an electronic controller 320.

The sensor 310 in the example circuit is any device or component which can sense the physical parameters of its environment, in one example sensor 310 is a temperature sensor, in one example the sensor is a pressure sensor, in one example the sensor is an accelerometer sensor 310, Gyro, tilt sensor, vibration sensor or combination of sensors reading and control logic, i.e. Tool is off when tilt sensor reads less than specific value, pressure sensor reads environmental pressure, a time sensor for providing to the controller 210 a specific time information including information such as time of day or timer of a particular duration. In one more example the sensor is a wireless signal detector such as Bluetooth signal, Infrared signal, Wi-Fi signal, GPS signal, radio frequency signal, WiMAX, etc. The sensor in other configuration is electric measurement sensor to measure voltage or power source 110 or voltage across a load 120 or the value of electrical current passing through an electric load 120, the amount of electrical current supplied by an electric source 110 or the electric powered consumed in an electrical load 120 or electrical power supplied by an electric source 110. The electronic controller 320 is an electrical device or a chip or a component which has functions similar to a computer on a single chip wherein it has input and output terminals to control the open and close position of the controllable power switch 230. The electronic controller 320 in one example is Discreet Logical ICs, microprocessor, microcontroller, CPLD or FPGA.

FIG. 3A is a schematic view of an exemplary electric circuit 100 with a sensor 310 activated controllable power switch 230 similar to FIG. 2B wherein the electric power source 110 is connected to the source terminal 140 of the controllable power switch 230. The electrical load 120, on the other hand, is connected to the load terminal 160 of the controllable power switch 230. In the given configuration of the controllable power switch 230, the electric power source 110 is disconnected from the electrical load 120.

FIG. 3B is another configuration of the same circuit, in this electric circuit 100 the electric power source 110 is connected to the electrical load 120 by the activation of the sensor 310. The activated signal from the sensor 310 is processed by the electronic controller 320 which controls the controllable power switch 230 by sending the control signals through the control link 220 to the controllable power switch 230. 23

FIG. 4 is a schematic view of different configurations of a flow activated controllable power switch 230, comprising of a fluid flow activated controllable power switch 230, a casing 420, a control link 220 and a flow sensitive controller 410. The fluid flow activated controllable power switch 230 is a device which is set to open or closed position based on the presence of the fluid flow.

The fluid flow activated controllable power switch 230 in one example is a limit switch, in one example the fluid activated controllable power switch 230 is a proximity sensor, in one example the fluid activated controllable power switch 230 is an infrared sensor, in one example the fluid activated controllable power switch 230 is a pressure sensor. The flow sensitive controller 410 in the present circuit comprises of an element sensitive to fluid flow. The element used in the controller is a device or component which can sense the fluid flow and give a control command to the controllable power switch 230 through a control link 220. The casing 420 is the part through which a fluid can flow. Casing 420 in one example is a pipe.

FIG. 4A is a schematic view of a controllable power switch 230 which is activated by the fluid flow; the controllable power switch 230 on one side is connected to the source terminal 140 and on the other side is connected to the load terminal 160. In the given configuration, there is no fluid flow thus the controllable power switch 230 is disconnecting the source terminal 140 to the load terminal 160.

FIG. 4B is another schematic view similar to FIG. 4A wherein the controllable power switch 230 on one side is connected to the source terminal 140 and on the other side is connected to the load terminal 160. In this configuration the fluid flows through the casing 420 in the flow direction 450 shown by the arrow, the presence of fluid flow is sensed by the controller element which generates a control command to close the controllable power switch 230. In another configuration the controller element senses the change in fluid property like change in fluid temperature, viscosity, color, 25 density, etc. The control command passes from the controller to the controllable power switch 230 through the control link 220. When the controllable power switch 230 receives the control command, the source terminal 140 is connected to the load terminal 160 by the controllable power switch 230.

FIG. 5 is a schematic view of a pressure activated controllable power switch 230 comprising of a controllable power switch 230, a controller sensitive to pressure 510 comprising of an element sensitive to pressure, control link 220 and casing 420. The controllable power switch 230 in this example circuit is a device or a component which is set to open or close position based on the presence of a pressure inside the casing 420. The controllable power switch 230 on one end is connected to the source terminal 140 and on the other end is connected to the load terminal 160.

FIG. 5A is a schematic view of an exemplary electric circuit 100 wherein the controllable power switch 230 is in open position, thus disconnecting the source terminal 140 from the load terminal 160, due to no or low fluid pressure inside the casing 420.

FIG. 5B is another schematic view similar to the FIG. 5A wherein the controllable power switch 230 is in closed position thus connecting the source terminal 140 to the load terminal 160. Due to the presence of a fluid flow in the casing 420 a pressure is generated inside the casing 420, the controller of the exemplary circuit senses the pressure and generates a control command to close the controllable power switch 230, the controllable power switch 230 receives the control command through control link 220 thus closing the switch which connects the source terminal 140 with the load terminal 160

FIG. 6 is a schematic view of an example circuit containing a controllable power switch 230, a controller sensitive to magnetic field 620, a control link 220, an electric power source 110, an elastic spring 610, horseshoe magnet and an electrical load 120. The controllable power switch 230 on one end is connected to the source terminal 140 and on the other end is connected to the load terminal 160. The controller comprises of an element sensitive to the magnetic field. The horseshoe magnet is any component which has a magnetic field associated with it, in one example it is a rare earth permanent magnetic of any shape, in one example it is an electromagnetic, in one example magnet is a wire carrying an electric current. The spring 610 is any component which has an elastic property, in one example spring 610 is a mechanical spring 610 of any shape.

FIG. 6A is a schematic view of an electric circuit 100 with a controllable power switch 230, wherein the controllable power switch 230 is in open position due to the presence of a weak or the none presence of magnetic field in its environment, thus disconnecting the source terminal 140 and the load terminal 160. The controllable power switch 230 is attached to the spring 610 which is at its equilibrium position i.e., without compression or extension. In this position, the electrical load 120 is disconnected from the electric power source 110.

FIG. 6B is a schematic view of an exemplary circuit with a controllable power switch 230 similar to the FIG. 6A wherein the controllable power switch 230 is in close position. In the presence of a strong enough magnetic field the controller generates a command signal that controls the position of the controllable power switch 230, the control command passes to the controllable power switch 230 through a control link 220 thus closes the controllable power switch 230. When the controllable power switch 230 is closed, it is followed by the extension of the spring 610 attached to it. When the switch is closed the source terminal 140 is connected to the load terminal 160 thus connecting the electric power source 110 to the electrical load 120. However, when the magnetic field is removed the controllable power switch 230 returns to the open position due to the restoring force of the spring 610.

FIG. 7 is a schematic view of an exemplary electric circuit 100 with a controllable power switch 230, controller sensitive to magnetic polarity 710, control link 220, electric power source 110, magnet and an electrical load 120. The controllable power switch 230 on one end is connected to the source terminal 140 and on the other end is connected to the load terminal 160. The controller comprises of an element sensitive to magnetic field polarity, in one example the element is a bipolar magnet or electromagnet.

Polar magnet 630 is a normal magnetic which has two poles south and north.

FIG. 7A is a schematic view of an exemplary circuit with a controllable power switch 230 connected to the polarity sensitive controller through a control link 220. In the given configuration, the controllable power switch 230 is in open position thus disconnecting the source terminal 140 from the load terminal 160. When the polarity of the magnetic and the controller element is the same the controllable power switch 230 is opened, thus disconnecting the source terminal 140 and the load terminal 160.

FIG. 7B is a schematic view similar to the FIG. 7A of an exemplary circuit with a controllable power switch 230 connected to the polarity sensitive controller through a control link 220 wherein the polarity of the magnet and the controller element are opposite. Due to the opposite polarity of the magnetic field of the magnet and the controller element sensitive to the magnetic field, a control command is generated to close the controllable power switch 230, the control command is passed through the control link 220 to the controllable power switch 230. When the switch is closed the source terminal 140 is connected to the load terminal 160, thus connecting the electric power source 110 to the electrical load 120.

FIG. 8 is a schematic view of an exemplary electric circuit 100 responsive to apparatus movement 850 comprising of a controllable power switch 230, a controller, an inertial mass 810, an electric power source 110 and an electrical load 120. The controllable power switch 230 on one end is connected to the source terminal 140 and on the other end is connected to the load terminal 160 The controller in this electric circuit 100 comprises of an inertial mass 810 element which is sensitive to the apparatus movement 850, when the apparatus moves in the direction 450 as shown by apparatus movement 850 direction 450 arrow the inertial element lags behind the movement 850. In one example the controller is an inertial mass 810. FIG. 8A is a schematic view of an electric circuit 100 having a controllable power switch 230, in this configuration the controllable power switch 230 is connected to the second electrical load 120 when there is no movement 850 in the apparatus, thus connecting the electric power source 110 to the second electrical load 120.

FIG. 8B is a schematic view of an electric circuit 100 similar to the FIG. 8A having a controllable power switch 230, wherein the apparatus is moving in the down direction 450, due to the movement 850 of the apparatus the controller comprising the inertial mass 810 element generates a delayed motion, a control command is thus sent by the controller to the controllable power switch 230 to connect the electric power source 110 to the third electrical load 120. The control command is sent through the control link 220 to the controllable power switch 230.

FIG. 8C is a schematic view of an electric circuit 100 similar to the FIG. 8B having a controllable power switch 230, wherein the apparatus is moving in the up direction 450, due to the movement 850 of the apparatus the controller comprising the inertial mass 810 element generates a delayed motion, a control command is thus sent by the controller to the controllable power switch 230 to connect the electric power source 110 to the first electrical load 120. The control command is sent through the control link 220 to the 32 controllable power switch 230.

FIG. 9 is a schematic view of an electric circuit 100 comprising of a controllable power switch 230 responsive to the change in inclination and gravity 950 of the apparatus. The circuit comprises of a controllable power switch 230, an electric power source 110, an electrical load 120, control link 220, a controller. The controllable power switch 230 on one end is connected to the source terminal 140 and on the other end is connected to the load terminal 160. The controller in this example comprises electric circuit 100 is a gravity 950 sensitive mass 910 element of a switch responsive to change in inclination and gravity 900 which responds to the changes in inclination of the apparatus comprising of mass 910, an electric power source 110 and an electrical load 120. Mass 910 is any switch which is suspended from one end, in one example mass 910 is a pendulum.

FIG. 9A is a schematic view of an electric circuit 100 consisting of a controllable power switch 230 which is controlled by the inclination and gravity 950 sensitive controller. In this configuration, the apparatus is inclined and the mass 910 element attached to the controller is pulled downwards due to the gravity 950 acting on the mass 910 element, thus the controllable power switch 230 is disconnected from the source terminal 140 and load terminal 160. Hence, there is no electric power flow from the source to the electrical load 120 and the electrical load 120 is not operating.

FIG. 9B is a schematic view similar to the FIG. 9A consisting of a controllable power switch 230 which is controlled by the inclination and gravity 950 sensitive controller. In this configuration, when the apparatus is inclined and after a rotation 1050 of an angle of about 180 degrees with respect to the initial position at one point, due to the effect of gravity 950 on the mass 910 element attached to the controller, the mass 910 element is pulled downwards. Therefore, the controller closes the controllable power switch 230 connecting the source terminal 140 to the load terminal 160. In this case the electrical load 120 is operated by the electric power source 110.

FIG. 10 is a schematic view of an electric circuit 100 comprising of a controllable power switch 230 responsive to the rotation 1050 along the centroid axis of the apparatus, it comprises of a controllable power switch 230, an inertial mass 810, a spring 610, a control link 220, an electrical load 120, an electric power source 110. The controllable power switch 230 on one end is connected to the source terminal 140 and on the other end is connected to the load terminal 160. The controller comprises of an inertial mass 810 that is sensitive to the apparatus rotation 1050 along the centroid axis of the apparatus.

FIG. 10A is a schematic view of an electric circuit 100 comprising of a controllable power switch 230 in first position when the apparatus is not in rotation 1050 wherein the electrical load 120 is disconnected from the electric power source 110.

FIG. 10B is a schematic view similar to the FIG. 10A comprising of a controllable power source. In this configuration, the apparatus is in the rotation 1050 about a rotation 1050 axis, thus the controller generates a control command to change the position of the controllable power switch 230 wherein the electrical load 120 is connected to the electric power source 110. The control command is sent to the controllable power switch 230 through the control link 220. Since other modifications and changes varied to fit particular operating requirements and environments will be apparent to those skilled in the art, the invention is not considered limited to the example chosen for purposes of disclosure, and covers all changes and modifications which do not constitute departures from the true spirit and scope of this invention.

FIG. 11 is a cross section of an apparatus for harvesting cooling energy to cool down component compartment. The apparatus comprises a body 1100 connected to the tubular string, an inner flow passage 1200 within the body 1100. A component compartment 1110 is disposed within the inner flow passage 1200. A thermally conductive element 1130 is disposed within the inner flow passage 1200 for thermally coupling the component compartment 1110 to the fluid within the inner flow passage 1200. A thermally insulating material 1150 isolate the component compartment 1110 from the annulus 1180. Inserted mud 1210 is inserted into the inner flow passage 1200 from surface. A returning mud 1310 is circulated at the deeper opening of the tubular string and flow up to surface in the annulus 1180.

FIG. 12 is a diagram explaining the method for power management of a downhole tool comprising,

-   The step of disposing in a wellbore a downhole tool 1210 wherein the     downhole tool comprising:     -   An electrical load having at least one load value selected from         the set comprising; A first load, and A second load;     -   At least one electric power source for providing electric power         to operate the electrical load disposed within the apparatus;     -   A controllable power switch for selectively electrically         connecting and disconnecting the electric power source to the         electrical load having plurality of modes selected from the set         comprising;     -   A first connecting mode wherein the source is connected to the         first load,     -   A second connecting mode wherein the electric power source is         connected to the second load,     -   And a disconnecting mode wherein the electric power source is         not connected to the electrical load     -   a controller comprising a sensor having at least two states         selected from the set of states comprising     -   a first power state wherein the controllable power switch is in         the first connecting mode,     -   a second power state wherein the controllable power switch is in         the second connecting mode,     -   and an off state wherein the electrical power switch is in the         disconnecting mode;     -   wherein the controller state is responsive to a predetermined         change in the environment detected by the sensor;     -   wherein the controllable power switch is responsive to the         controller state; -   Causing a change of the environment 1220 selected form the set     comprising:     -   pressure, fluid flow rate, temperature, magnetic field,         geographical position, electromagnetic waves, noise, distance         from objects, movement, inclination, light, ultraviolet signal,         infrared signal, rotation, time, timer, volt value of an         electric power source, electric current drained from an electric         power source; -   Changing the controller state 1230 in response to the change of the     environment to a state selected from the set comprising:     -   a first power state, a second power state and an off state; -   Changing the controllable power switch mode 1240 from a first mode     to a second mode selected from the set comprising:     -   a first connecting mode, a second connecting mode and an         disconnecting mode.

A method of changing temperature of a component compartment in a downhole tool used in drilling a well, the method comprising;

-   Disposing to a particular depth within a well an apparatus 1310     comprising:     -   a body adapted to be connected to the tubular string;     -   an internal fluid passage for connecting fluid through the body         having an inlet port and an outlet port;     -   an component compartment within the body thermally coupled to         the internal fluid passage;     -   Wherein the component compartment temperature is responsive to         the temperature of the internal fluid passage. -   The step of inserting a fluid from shallower depth into the tubular     string 1320 and through the internal fluid passage, wherein the     fluid temperature is of a different temperature when compared the     earth temperature at the apparatus -   The step of thermally coupling the fluid temperature to the     component compartment 1330 for changing the component compartment     temperature compared to earth temperature at the same depth of the     apparatus.

In operation: Downhole tools for oil and gas wells are commonly powered with expensive batteries such as lithium battery. Power conservation of those batteries is desirable to reduce operating cost and reduce effect on the environment. A downhole tool comprises electrical load such an electronic circuitry and sensors running at very high clock speed in the range of kilo hertz or mega hertz. On the other hand significant changes of the environment does not happen at very high rates such as change in pressure normally change at the second level not micro second level. It is desirable to lower the power consumption of the downhole tools and conserve batteries. Electronic controller 210 can be built with a timer sensor 310 such that the controller switch off the power from the electric load 120 by means of the controllable switch 230 a significant portion of time and switch on for a fraction of a second to do the necessary function then go to an off state or low power state for the remainder of the cycle.

In a different embodiment, a downhole tool powered by batteries are loaded at a workshop normally far form the wellsite. While it is on standby before lowered into an oil well, the electrical and electronic circuitry within the tool consumes electric power unnecessarily. It is desirable to switch the power off while on stand by and switch back on, before or after it is lowered in the well. The controllable switch 230 can be operated by the controller 320 based on the change of the environment such as moving the tool from the loading bay in horizontal state to a vertical position to lower into the oil well. A tilt sensor 310 or the one explained in FIG. 9 can be suitable to provide the controller 320 power on the downhole tool. In a different application it is desired to conserve energy until the time when the downhole tool is lowered below certain depth and in such a case a pressure sensor 310 or another similar to the one explained in FIG. 5 can be used to power on the tool. In a different application it is desirable to switch the downhole tool when flow is moving through the tool or stops flow through the tool and in such an application a flow sensor 310 or a similar to the one described in FIG. 4 can be more appropriate. In a different application it is desirable to switch the downhole tool when it is moving in certain direction within the well bore and a movement sensor 310, an accelerometer sensor 310 of an inertia sensor similar to the one explained in FIG. 8 can be deployed within the downhole tool. In a different application it is desirable to switch the power to the tool when the string is rotating and a rotational sensor 310, a gyro sensor 310 or an inertia sensor such the one explained in FIG. 10 could be deployed to address this application.

In a different application it is desirable that an operator switch on the tool manually without exposing the electronics or opening the downhole tool. In such an application, the use of a magnet or change in magnetic field similar to those explained in FIGS. 6 and 7 can be used where an operator uses a magnet piece close to the external body of the downhole tool where the magnetic sensor 310 will provide the necessary information to the controller 320 to control the controllable switch 230 and connect the appropriate power source 110 to the desired load 120.

In a different application it is desired to have a downhole backup source such that when one power source 110 is drained or reach a predetermined power storage, to be disconnected from the load 120 and another power source 110 is connected to the same electric load 120, a volt sensor 310, or a power sensor 310 can be used to provide the necessary information to the controller and perform the desired switching. This method enables operator to continue operate the tool and avoid unnecessary expensive tool failure due to insufficient power downhole.

In a different application it is desired to operate a first load 120 such as a digital circuit that consumes low power level and then operate another load such as a motor load 120 that consumes much higher electric power for a period of time. In this application a time sensor 310 or a suitable sensor 310 will provide the controller 320 the necessary information to operate the controllable switch 230 and connect a sufficient power source 110 to the load 120 during that particular time when the motor load 120 is operated and then switch back to a lower power source 110 after the motor duty is completed and only the lower power load 120 is operating using a much lower electrical power source 110.

The present disclosure explains the method of power conservation and power switching between a downhole power supply and a load based on a desired application providing saving of battery power and reduce of operation cost.

In a different application particularly in hot wells, it is desirable to keep the electronics and power sources at lower temperature level compared to ambient downhole temperature of the reservoir being drilled. It is therefore desirable to have a means of cooling the electronics and the temperature sensitive components. The present invention discloses a method for reducing the temperature of the downhole electronics and power sources through harvesting cooling energy from mud pumped through the tubular string from surface. Mud and drilling fluids pumped into the tubular string from surface commonly has an initial temperature close to surface temperature. When pumped into the tubular string at fast flow rate, it retain a large portion of its lower temperature compared to downhole temperature. The mud as explained earlier is used to cool the drill bit while cutting new formation into earth layers. The inserted mud 1160 flowing into the inner flow passage 1155 from surface to downhole is of lower temperature when compared to the formation temperature at that point, when it reach the drill bit or the lowest end of the string then circulated to the annulus 1180, the returning mud 1170 is of higher temperature than the inserted mud 1160. A component compartment 1110 into the inner flow passage 1155. A thermally conductive element 1130 thermally couple the component compartment 1110 to the inner flow passage 1155. A thermally insulator 1150 thermally isolate the component compartment 1110 from the annulus 1180 and from the body 1100.

Inserted mud 1155 of lower temperature when comes in contact with the thermal conductive element 1130 transfers part of the cooling energy to the component compartment 1110. A thermal insulator 1150 such as Teflon, silicon, wood or similar thermally isolate the component compartment 1110 from the much higher temperature of the annulus 1180. Component element 1120 within the component compartment will enjoy a lower ambient temperature when compared to the temperature of the annulus 1180.

The method comprising, lowering into a well a downhole tool comprising a component compartment 1110 thermally insulated from the annulus 1180 and thermally connected to the inner flow passage 1155, then pumping inserted mud 1160 of cooler temperature into the inner flow passage will result in the component element 1120 within the component compartment 1110 to enjoy a compartment temperature lower than the temperature of the annulus 1180 and closer to the temperature of the inserted mud 1120. 

Having thus described the invention, what is desired to be protected by Letters Patent is presented in the subsequently appended claims:
 1. An apparatus configured and arranged to work inside a downhole tool used in a downhole environment of subterranean wells comprising: An electrical load having at least one load value selected from the set comprising; A first load, A second load; At least one electric power source for providing electric power to operate the electrical load disposed within the apparatus; A controllable power switch for electrically connecting and disconnecting the electric power source to the electrical load having plurality of modes selected from the set comprising; A first connecting mode wherein the electric power source is connected to the first load, A second connecting mode wherein the electric power source is connected to the second load, And a disconnecting mode wherein the electric power source is not connected to the electrical load a controller comprising a sensor having at least two states selected from the set of states comprising a first power state wherein the controllable power switch is in the first connecting mode, a second power state wherein the controllable power switch is in the second connecting mode, and an off state wherein the electrical power switch is in the disconnecting mode; wherein the controller state is responsive to a predetermined change in the environment detected by the sensor; wherein the controllable power switch is responsive to the controller state.
 2. The apparatus of claim 1, wherein the sensor is selected from the set comprising: A volt sensor, an electrical current sensor, an electrical power sensor, a fluid flow sensor, a pressure sensor, a temperature sensor, a magnetic sensor, a GPS, a Radio Frequency sensor, a sonic sensor, an ultrasonic sensor, a movement sensor sensitive to the movement of the apparatus; an inclination sensor sensitive to the inclination of the apparatus, a light sensor, a rotation sensor sensitive to the rotation of the apparatus, and a timer;
 3. The apparatus of claim 1, wherein the change of the environment is selected from the set comprising; pressure, fluid flow rate, temperature, magnetic field, geographical position, electromagnetic waves, noise, distance from an object, movement, inclination, light, rotation, time, timer, volt value of an electric power source, electric current drained from an electric power source and electric power consumed from an electric power source.
 4. The apparatus of claim 1, wherein the electric power source is selected from the set comprising a battery, a plurality of batteries connected in series, a plurality of batteries connected in parallel, a plurality of batteries connected partially in series and partially in parallel, an electric power generator, an energy harvester, an electric power converter, an electric power supply;


5. The apparatus of claim 1, wherein the controller is selected from the set comprising a mechanical controller, a hydraulic controller, an electronic controller, a microprocessor, a micro controller, a Programmable Logic Controller (PLC), and a Distributed Control System (DCS).
 6. A method for power management of a downhole tool comprising, Disposing in a wellbore a downhole tool comprising: An electrical load having at least one load value selected from the set comprising; A first load, A second load; At least one electric power source for providing electric power to operate the electrical load disposed within the apparatus; A controllable power switch for selectively electrically connecting and disconnecting the electric power source to the electrical load having plurality of modes selected from the set comprising; A first connecting mode wherein the source is connected to the first load, A second connecting mode wherein the electric power source is connected to the second load, And a disconnecting mode wherein the electric power source is not connected to the electrical load a controller comprising a sensor having at least two states selected from the set of states comprising a first power state wherein the controllable power switch is in the first connecting mode, a second power state wherein the controllable power switch is in the second connecting mode, and an off state wherein the electrical power switch is in the disconnecting mode; wherein the controller state is responsive to a predetermined change in the environment detected by the sensor; wherein the controllable power switch is responsive to the controller state; Causing a change of the environment selected form the set comprising: pressure, fluid flow rate, temperature, magnetic field, geographical position, electromagnetic waves, noise, distance from objects, movement, inclination, light, ultraviolet signal, infrared signal, rotation, time, timer, volt value of an electric power source, electric current drained from an electric power source; Changing the controller state in response to the change of the environment to a state selected from the set comprising: a first power state, a second power state and an off state; Changing the controllable power switch mode from a first mode to a second mode selected from the set comprising: a first connecting mode, a second connecting mode and an disconnecting mode.
 7. A method of changing temperature of a component compartment in a downhole tool used in drilling a well, the method comprising; Disposing to a particular depth within a well an apparatus comprising: a body adapted to be connected to the tubular string; an internal fluid passage for connecting fluid through the body having an inlet port and an outlet port; an component compartment within the body thermally coupled to the internal fluid passage; Wherein the component compartment temperature is responsive to the temperature of the internal fluid passage. The step of inserting a fluid from shallower depth into the tubular string and through the internal fluid passage, wherein the fluid temperature is of a different temperature when compared the earth temperature at the apparatus The step of thermally coupling the fluid temperature to the component compartment for changing the component compartment temperature compared to earth temperature at the same depth of the apparatus.
 8. The method in claim 7 wherein the inserted fluid from surface is of a lower temperature than the earth temperature at the downhole tool.
 9. The method in claim 7 wherein the component compartment is thermally isolated from the annulus. 